<template>
	<view>
		<u-cell-group v-for="(item,index) in list" :key="index">
			<u-cell size="large" :title="item.title" :url="item.url" v-if="menus.includes(item.role)" :icon="item.icon"
				isLink></u-cell>
		</u-cell-group>
	</view>
</template>

<script>
	import {
		mapState,
	} from 'vuex'
	export default {
		data() {
			return {
				list: [{
						title: '加料品',
						icon: "setting-fill",
						url: '/pages/home/diandan/jialiao/index',
						role: 'dian/jia',
					},
					{
						title: '加料组',
						icon: "setting-fill",
						url: '/pages/home/diandan/jialiaozu/index',
						role: 'dian/jialiaozu',
					},
					{
						title: '规格组',
						icon: "setting-fill",
						url: '/pages/home/diandan/guigezu/index',
						role: 'dian/guige',
					},
					{
						title: 'SPU标品',
						icon: "setting-fill",
						url: '/pages/home/diandan/spu/index',
						role: 'dian/spu',
					},
					{
						title: '点单品',
						icon: "setting-fill",
						url: '/pages/home/diandan/diandanpin/index',
						role: 'dian/dianpin',
					},
				]
			}
		},
		methods: {},
		computed: {
			...mapState({
				menus: state => state.menus,
			}),
		},
	}
</script>

<style>

</style>